package top.itlir.edc.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import top.itlir.edc.dao.PromotionRepository;
import top.itlir.edc.domain.PageBean;
import top.itlir.edc.domain.Promotion;
import top.itlir.edc.service.IPromotionService;

@Service
@Transactional
public class PromotionServiceImpl implements IPromotionService {
	
	@Autowired
	private PromotionRepository promotionRepository;

	@Override
	public void save(Promotion model) {
		promotionRepository.save(model);
	}

	@Override
	public Page<Promotion> findAll(Specification<Promotion> spec,
			Pageable pageable) {
		return promotionRepository.findAll(spec, pageable);
	}




}
